package com.vancouver.knows.ui.activity.my;

import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.TextView;
import com.vancouver.knows.R;
import com.vancouver.knows.ui.base.BaseActivity;
import com.vancouver.knows.ui.view.RichWebView;

import butterknife.Bind;


public class MyPointsWebViewActivity extends BaseActivity {
	private Context mContext;
	@Bind(R.id.common_tips)
	TextView  mCommonTips;
	@Bind(R.id.common_back)
	ImageView mCommonBack;
	@Bind(R.id.webview)
	RichWebView webview;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.point_webview);
		mContext = MyPointsWebViewActivity.this;
		setViews();
		setListeners();
	}
	
	@Override
	protected void onResume() {
		super.onResume();
	}

	@SuppressLint("SetJavaScriptEnabled")
	private void setViews() {
		Intent intent = getIntent();
		String tips = intent.getStringExtra("USER_NOTICE");
		String url = intent.getStringExtra("POINT_URL");
		mCommonTips.setText(tips);
		webview.loadURL(url);
	}
	
	private void setListeners(){
		mCommonBack.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				finish();
			}
		});
	}

}